SET(CMAKE_CXX_FLAGS "-O2 -g -Wall -fmessage-length=0 -I /usr/include/libusb-1.0")

FIND_PACKAGE(OpenCV REQUIRED)

FIND_PATH(FREENECT_INCLUDE_DIR
NAMES libfreenect.h
PATHS /usr/local/include/libfreenect)

FIND_LIBRARY(FREENECT_LIBS
NAMES libfreenect.so
PATHS /usr/lib)

INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIR} ${FREENECT_INCLUDE_DIR})

ADD_EXECUTABLE(kinect_loopback kinect_loopback.cpp)
TARGET_LINK_LIBRARIES(kinect_loopback ${OpenCV_LIBS} ${FREENECT_LIBS})
